package cwnu.sapphire.com.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;

import java.util.Date;
@TableName("user")
public class User {
    @ExcelIgnore
    @TableId(type = IdType.AUTO) // 数据库自增主键
    /** 主键，自增，学生ID */
    private Integer id;
    @ExcelProperty("姓名")
    /** 学生姓名 */
    private String name;
    @ExcelProperty("学号")
    /** 用户名，默认为学号 */
    private String username;
    /** 密码，默认123456 */
    @ExcelIgnore
    private String password = "123456";
    /** 1~4：表示大一到大四 */
    @ExcelIgnore
    private Integer grade;

    /** 1~n：表示一班到n班 */
    @ExcelIgnore
    private Integer clazz;
    @ExcelProperty("性别")
    /** 0：女生，1：男生 */
    private String gender;
    /** 删除标志，1：删除，0：未删除 */
    @ExcelIgnore
    private Integer deleteFlag;
    /** 创建时间 */
    @ExcelIgnore
    private Date createTime;

    /** 更新时间 */
    @ExcelIgnore
    private Date updateTime;

    public User() {
    }

    public User(Integer id, String name, String username, String password, Integer grade, Integer clazz, String gender, Integer deleteFlag, Date createTime, Date updateTime) {
        this.id = id;
        this.name = name;
        this.username = username;
        this.password = password;
        this.grade = grade;
        this.clazz = clazz;
        this.gender = gender;
        this.deleteFlag = deleteFlag;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    /**
     * 获取
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return username
     */
    public String getUsername() {
        return username;
    }

    /**
     * 设置
     * @param username
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * 获取
     * @return password
     */
    public String getPassword() {
        return password;
    }

    /**
     * 设置
     * @param password
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * 获取
     * @return grade
     */
    public Integer getGrade() {
        return grade;
    }

    /**
     * 设置
     * @param grade
     */
    public void setGrade(Integer grade) {
        this.grade = grade;
    }

    /**
     * 获取
     * @return clazz
     */
    public Integer getClazz() {
        return clazz;
    }

    /**
     * 设置
     * @param clazz
     */
    public void setClazz(Integer clazz) {
        this.clazz = clazz;
    }

    /**
     * 获取
     * @return gender
     */
    public String getGender() {
        return gender;
    }

    /**
     * 设置
     * @param gender
     */
    public void setGender(String gender) {
        this.gender = gender;
    }

    /**
     * 获取
     * @return deleteFlag
     */
    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    /**
     * 设置
     * @param deleteFlag
     */
    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    /**
     * 获取
     * @return createTime
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置
     * @param createTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取
     * @return updateTime
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置
     * @param updateTime
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String toString() {
        return "User{id = " + id + ", name = " + name + ", username = " + username + ", password = " + password + ", grade = " + grade + ", clazz = " + clazz + ", gender = " + gender + ", deleteFlag = " + deleteFlag + ", createTime = " + createTime + ", updateTime = " + updateTime + "}";
    }
}
